package com.example.bzh.gamecat.ui.society;

import com.example.bzh.gamecat.bean.SocietyBean;
import com.example.bzh.gamecat.httputils.societyutils.SocietyHttpUtil;

import java.util.HashMap;

/**
 * Created by MyPC on 2016/8/13.
 */
public class SocietyPresenter implements SocietyContract.IPresenter {
    private SocietyContract.IModel model;
    private SocietyContract.IView view;
    public SocietyPresenter(SocietyContract.IModel model,SocietyContract.IView view){
        this.model = model;
        this.view = view;
    }

    @Override
    public void initData(HashMap<String, String> params) {
        model.getSociety(params, new SocietyHttpUtil.HttpCallBack<SocietyBean>() {
            @Override
            public void onSucess(SocietyBean societyBean) {
                view.OnSeccessGetSociety(societyBean);
            }

            @Override
            public void onFail() {
                view.OnFailGetSociety("网络加载失败......");
            }
        });
    }
}
